<template>
  <a-modal v-bind="$attrs" unmount-on-close :mask-closable="false" class="modal-dialog-wrapper">
    <Scrollbar wrap-class="modal-dialog__wrap" :style="{ height: contentHeight }">
      <slot name="content"></slot>
    </Scrollbar>
    <template #footer>
      <slot name="footer"></slot>
    </template>
  </a-modal>
</template>

<script lang="ts">
  import { defineComponent } from 'vue'

  export default defineComponent({
    name: 'IModalDialog',
    props: {
      contentHeight: {
        type: String,
        default: '50vh',
      },
    },
  })
</script>
<style>
  .modal-dialog__wrap {
    max-height: 80vh;
  }
</style>
